﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html>
    <head>
        <meta content="Innovasys Document! X (http://www.innovasys.com)" name=GENERATOR>
        <!--DXMETADATA start type="MetaCharset" --><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><!--DXMETADATA end-->
        <!--DXMETADATA start type="PageItemTitle" format="<title>Overview</title>" --><title>RibbonBar Collection</title><!--DXMETADATA end-->
        <link href="stylesheets/axstylesheet.css" type=text/css rel=stylesheet>
        <script src="script/ax.js" type=text/javascript>
    </script>

    


<style>
html,div { margin: 0; padding: 0;}

body {
	padding: 0px;
	margin: 0px;
	overflow: auto;
	height: 100%;
}

#winchm_template_button{
	float: right;
	width: 93px;
	top: 7px;
	position: relative;
	text-align: right;
	right: 5px;
	height: auto;
}

#winchm_template_top{
	padding: 0px;
	margin: 0px;
	border-bottom: 1px solid #9B9B9B;
	background-color: #B1CEFE;
}

#winchm_template_navigation{
	margin: 0px;
	padding-top: 7px;
	padding-left: 7px;
	padding-bottom: 3px;
	padding-right: 0px;
	font-size: 8.5pt;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #585858;
}

#winchm_template_title{
	margin: 0px;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 7px;
	padding-right: 0px;
	font-size: 18px; 
	font-family: Verdana, Geneva, sans-serif;
	color: #363636;
}

#winchm_template_content{
	margin-top: 20px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	width: auto  !important;
	width: 100%;
}

#winchm_template_footer{
	border-width: 1px;
	border-color: #B1CEFE;
	border-top-style: solid;
	margin-top: 15px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	padding-top: 7px;
	padding-left: 0px;
	padding-bottom: 0px;
	padding-right: 0px;
	font-family: arial, helvetica, sans-serif;
	font-size: 8.5pt;
	color: #696969;
	width: auto;
	text-align: left;
}


#winchm_template_container{
	margin: 0px;
	padding: 0px;
	position: static;
	padding-bottom: 3px;
	overflow: auto;
	background-color: #FFFFFF;
}


@media print
{
#winchm_template_container{
	position: static;	
	margin: 0px;
	padding: 5px;
	
	width: auto;
	height: auto;
	overflow: auto;
}
#winchm_template_button{
visibility:hidden;
}
}

#winchm_template_navigation A:link	{text-decoration: none; color:#004080}
#winchm_template_navigation A:visited  {text-decoration: none; color: #004080}
#winchm_template_navigation A:active {text-decoration: none; color: #004080 }
#winchm_template_navigation A:hover {text-decoration: none;color: #0080FF}

A:link	{text-decoration: underline; color:#0033CC}
A:visited  {text-decoration: underline; color: #0033CC}
A:active {text-decoration: underline; color: #0033CC }
A:hover {text-decoration: underline;color: #FF0000;}
</style>
<script type="text/javascript">
function isMobile(){
Agent = window.navigator.userAgent;
if (Agent.indexOf("iPhone")>=1 || Agent.indexOf("iPad")>=1 || Agent.indexOf("iPod")>=1 || Agent.indexOf("Android")>=1){
return true;
}else{
return false;	
}

}
function d_onresize(){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
document.getElementById('winchm_template_container').style.pixelWidth = document.body.offsetWidth - 3;
document.getElementById('winchm_template_container').style.pixelHeight = document.body.offsetHeight - document.getElementById('winchm_template_top').offsetHeight - 4;
}
document.getElementById('winchm_template_container').style.top = document.getElementById('winchm_template_top').offsetHeight + 'px';
}

function d_onbeforeprint(){
document.getElementById('winchm_template_container').style.width = 'auto';
document.getElementById('winchm_template_container').style.height = 'auto';
}

function d_onafterprint(){
d_onresize();
}

if(!isMobile()){

window.onload = d_onresize;
window.onresize = d_onresize;
window.onbeforeprint = d_onbeforeprint;
window.onafterprint = d_onafterprint;

document.write("<style>\n");
document.write("body {overflow: hidden;}\n");
document.write("#winchm_template_container {position: absolute;overflow: auto;top : 0px;right: 0px;bottom: 0px;left: 0px;}\n");
document.write("</style>\n");
}

</script>
</head>
    <body><script language="JavaScript" type="text/JavaScript">
function syn(){
if(parent.nav.tree){
 if(parent.nav.tree.loaded){
  parent.nav.tree.selectNode(5381);
 }else{
  setTimeout("syn()",500);
}
  }else{
  setTimeout("syn()",500);
  }}
if(parent!=self){
  setTimeout("syn()",100);
}else{
  parent.location.href = "../index.htm?page=XtremeCommandBars~RibbonBar.html";
}
originalOnload = window.onload;
if(originalOnload==null){
window.onload = function(){parent.contentLoaded = true;};
}else{
window.onload = function(){originalOnload();parent.contentLoaded = true;};
}
</script> 


<div id="winchm_template_top">
	<div id="winchm_template_button"><A href="XtremeCommandBars~RibbonBar.html" title="Previous topic"><img id="winchm_template_prev" alt="Previous topic" src="template2/btn_prev_n.gif" border="0"></a><A href="XtremeCommandBars~RibbonBar_members.html" title="Next topic"><img id="winchm_template_next" alt="Next topic" src="template2/btn_next_n.gif" border="0"></a></div>
	<div id="winchm_template_navigation">Help &gt; 
<A href="welcome_screen.htm">Codejock ActiveX Controls v15.3</A> &gt; <A href="XtremeCommandBars_P.html">Xtreme Command Bars</A> &gt; Objects &gt; <A href="XtremeCommandBars~RibbonBar.html">RibbonBar Collection</A> &gt; </div>
	<div id="winchm_template_title">Overview</div>
</div>
<div id="winchm_template_container">
	<div id="winchm_template_content"><div class=popupbubble id=dxseealsomenu><p id=dxseealsocontent><a href="#Bookmark5382">RibbonBar Members</a>
&nbsp;|&nbsp;<a href="#Bookmark4646">AddRibbonBar Method</a>
&nbsp;|&nbsp;<a href="#Bookmark4664">FindControl Method</a>
&nbsp;|&nbsp;<a href="#Bookmark4716">Execute Event</a>
&nbsp;|&nbsp;<a href="#Bookmark4729">Update Event</a>
&nbsp;|&nbsp;<a href="#Bookmark5386">EnableDocking Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5393">RecalcLayout Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5394">RedrawBar Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5398">SetIconSize Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5429">TabCount Property</a>
&nbsp;|&nbsp;<a href="#Bookmark5392">InsertTab Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5479">RibbonGroup Object</a>
&nbsp;|&nbsp;<a href="#Bookmark7523">XTPControlFlags Enumeration</a>
</p><!--DXMETADATA end --> 
        </div>
        <div id=pagetop>
            <div id=projectnamebanner>
                <table class=projectnametable cellspacing=0>
                    <tbody>
                        <tr>
                            <!--DXMETADATA start type="Literal" condition="childitems:itemtype=seealso" value="<td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td>" --><td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td><!--DXMETADATA end -->
                            <td>
                                <!--DXMETADATA start type="Phrase" Name="Product_Header" -->Xtreme Command Bars ActiveX Control v15.3<!--DXMETADATA end --> 
                            </td>
                            <td align=right>
                                <!--DXMETADATA start type="Variable" name="FeedbackLink" format="" --><!--DXMETADATA end -->
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div id=pagetitlebanner>
                <h1 class=dxh1>
                <!--DXMETADATA start type="PageItemTitle" -->RibbonBar Collection<!--DXMETADATA end --></h1>
            </div>
        </div>
        <div id=pagebody valign="bottom">
            <!--DXMETADATA start type="IsNew" format="<script>document.all.pagebody.className = 'newTopic'</script>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Description" source="Item" format="<h4 class=dxh4>$$Description$$</h4><p>%%description%%</p>" --><h4 class=dxh4>Description</h4><p>Represents an Office 2007 style&nbsp;Ribbon Bar.</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Scrap" name="_MEMBERS_LINK" format="<p>%%scrap%%</p>" --><p>For a list of all members defined in this module, see <a href="#Bookmark5382">RibbonBar members</a>.</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Diagram" source="item" format="<h4 class=dxh4>$$OBJECT_MODEL$$</h4><p>%%Diagram%%</p>" --><h4 class=dxh4>Object Model</h4><p><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD NOWRAP>
<a href="#Bookmark5380"><img src="cDiagramImages/XtremeCommandBars~RibbonBar~68.gif" border=0></a><img src="cDiagramImages/paracros.gif" border=0><a href="#Bookmark5524"><img src="cDiagramImages/XtremeCommandBars~RibbonTab~68.gif" border=0></a>
</TD></TABLE>
</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##MODULE_REMARKS" format="<h4 class=dxh4>$$Remarks$$</h4><p>%%comment%%</p>" --><h4 class=dxh4>Remarks</h4><p><P>No longer will your users need to fumble through confusing and boring menus. The Office 2007 style Ribbon control introduces a completely new way to design your user interface. Tabbed toolbars almost completely eliminate the need for a menu bar. All your old menu items can be elegantly displayed in a toolbar. Numerous toolbars cluttered all around is a thing of the past, all that is needed now is to click on an informative tab. Your users can navigate the tabs exactly like the old style menu system so they will never miss a beat. In addition to the tabbed toolbars, the ribbon provides smart layout features that allow you to do new things not possible with normal toolbars. Grouped items now contain a caption bar so it is easy for your users to see what the items will do. Smart layout allows each item to have multiple image sizes. The smart layout will display the largest images when enough room is available and automatically display the smaller icons when space is tight. Not only are images swapped when the application is resized, but the items will be re-arranged so that they are always visible in the toolbar. When toolbar space is abundant, large images with item captions are displayed, if space is limited, then only small icons with no captions are displayed.</P>
<P>&nbsp;</P>
<P><IMG src="Pictures/tour_firstr.png" border=0></P>
<P>&nbsp;</P>
<P>The&nbsp;<A href="#Bookmark4646">AddRibbonBar</A>&nbsp;method&nbsp;adds a Ribbon Bar to the command bars.&nbsp; The Ribbon Bar is just a different type of command bar and functions similar with some added functionality.&nbsp; Buttons, Popups, and tabs can all be added to the same "bar".&nbsp; Finding a control in the Ribbon Bar is done using the <A href="#Bookmark4664">FindControl</A>&nbsp;method.&nbsp; The controls in the Ribbon Bar respond exactly the same way they would in a normal toolbar.&nbsp; The <A href="#Bookmark4716">Execute</A>&nbsp;event is used&nbsp;when an item is clicked or executed and the status of items is updated using the&nbsp;<A href="#Bookmark4729">Update </A>event.</P>
<P>&nbsp;</P>
<P>After adding a <A href="#Bookmark5380">RibbonBar</A>, the <A href="#Bookmark5386">EnableDocking</A>&nbsp;method should be used to disabled docking by using the&nbsp;<A href="#Bookmark7523">xtpFlagStretched</A> flag, or by using a zero (0).&nbsp; If docking is desired, the Ribbon Bar can only be docked to the top or bottom of the application.</P>
<P>&nbsp;</P>
<P>Call the <A href="#Bookmark5393">RecalcLayout </A>&nbsp;method to correctly size the&nbsp;Ribbon Bar&nbsp;when the layout has changed.&nbsp; Layout refers to anything that changes the size of the Ribbon Bar.&nbsp; For example, a layout change that requires&nbsp;the <A href="#Bookmark5393">RecalcLayout&nbsp;</A>&nbsp;method to be called&nbsp;would be <A href="#Bookmark5509">adding a group</A>,&nbsp;<A href="#Bookmark5483">adding an item to a group</A>,&nbsp;changing the caption of a tab or adding\removing tab icons because the new caption could be smaller or wider.</P>
<P>&nbsp;</P>
<P>For visible changes to the&nbsp;Ribbon Bar&nbsp;such as changing the tab color of a visible tab&nbsp;button, the <A href="#Bookmark5394">RedrawBar</A>&nbsp;method is used.</P>
<P>&nbsp;</P>
<P><A href="#Bookmark5398">SetIconSize</A>&nbsp;sets the size of the&nbsp;"normal" icons&nbsp;displayed in the Ribbon Bar.&nbsp; Icons will not be displayed smaller that the size specified with <A href="#Bookmark5398">SetIconSize</A>.&nbsp; If a larger icon has not been added with the specified size, then the closet match will be scaled to the specified size.</P>
<P>&nbsp;</P>
<P>The <A href="#Bookmark5429">TabCount</A>&nbsp;property returns the total number of tabs that have been added to the <A href="#Bookmark5428">tabs collection</A>.</P>
<P>&nbsp;</P>
<P><A href="#Bookmark5392">InsertTab</A><STRONG> </STRONG>adds a new <A href="#Bookmark5524">RibbonTab</A>&nbsp;to the&nbsp;<A href="#Bookmark5428">tabs collection</A>&nbsp;of the Ribbon Bar.</P>
<P>&nbsp;</P>
<P>Tabs in the Ribbon Bar contain one or more <A href="#Bookmark5479">RibbonGroup</A>&nbsp;objects.&nbsp; Buttons, Popups, etc can then be added to the groups.</P>
<P>&nbsp;</P>
<P>The&nbsp;<A href="#Bookmark5429">TabCount</A>&nbsp;property can be used to determine the total number of tabs that have been added.</P>
<P>&nbsp;</P>
<P>Each&nbsp;<A href="#Bookmark5524">RibbonTab</A>&nbsp;can contain one or more&nbsp;<A href="#Bookmark5479">RibbonGroup</A> objects that are used to hold <A href="#Bookmark4223">CommandBarControl</A>&nbsp;objects.&nbsp;&nbsp;The&nbsp;<A href="#Bookmark5491">Caption</A>&nbsp;of a <A href="#Bookmark5479">RibbonGroup</A> is a title bar that visually "groups" the <A href="#Bookmark4223">CommandBarControl</A>&nbsp;objects that have been added to the&nbsp;<A href="#Bookmark5501">RibbonGroup Items Collection</A>.</P>
<P>&nbsp;</P>
<P>Groups are added to the&nbsp;<A href="#Bookmark5535">RibbonTab Groups Collection</A> using the <A href="#Bookmark5509">AddGroup</A>&nbsp;and <A href="#Bookmark5510">InsertGroup</A>&nbsp;methods.&nbsp; Items are added to a group using the&nbsp;<A href="#Bookmark5483">Add</A>&nbsp;method.</P>
<P>&nbsp;</P>
<P>Methods and Properties unique to the&nbsp;Ribbon Bar&nbsp;are:</P>
<P><A href="#Bookmark5392">InsertTab</A>&nbsp;and <A href="#Bookmark5430">TabPaintManager</A> methods.</P>
<P><A href="#Bookmark5429">TabCount</A>&nbsp;and&nbsp;<A href="#Bookmark5428">Tab</A>&nbsp;properties</P></p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="ITEM_LIST_WITH_HEADER" namespace="implemented interface" source="Item" filter="" format="<h4 class=dxh4>$$Interfaces$$</h4>%%filtereditemlist%%" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##MODULE_EXAMPLEINTRO" format="<h4 class=dxh4>$$Example$$</h4><p>%%comment%%</p>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="INLINE_EXAMPLE" namespace="Example" source="Item" filter="type=inline" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$Example$$</h4>,format= %%%%filtereditemlist%%" --><h4 class=dxh4>Example</h4><DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[Ribbon Bar Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to add a Ribbon Bar, how to add tabs to the Ribbon Bar, how to add groups to the tabs, and how to add items to the groups.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB">&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> TabWrite <font class='keyword'>As</font> RibbonTab, GroupFont <font class='keyword'>As</font> RibbonGroup, Control <font class='keyword'>As</font> CommandBarControl<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> GroupClipborad <font class='keyword'>As</font> RibbonGroup, ControlPopup <font class='keyword'>As</font> CommandBarPopup<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Declare a Ribbon Bar object</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> RibbonBar <font class='keyword'>As</font> RibbonBar<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add a Ribbon Bar to the command bars</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> RibbonBar = CommandBars.AddRibbonBar(<font class='string'>&quot;Ribbon Bar&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Specify the Ribbon Bar is to use the stretched docking style.  The Ribbon Bar</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'can only be docked to the top or bottom of an application</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;RibbonBar.EnableDocking xtpFlagStretched<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> ControlFile <font class='keyword'>As</font> CommandBarPopup<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add a normal popup to the Ribbon Bar.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ControlFile = RibbonBar.Controls.Add(xtpControlPopup, -1, <font class='string'>&quot;&File&quot;</font>, 1)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add commands to the popup</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>With</font> ControlFile.CommandBar.Controls<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Add xtpControlButton, ID_FILE_NEW, <font class='string'>&quot;&New&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.Add xtpControlButton, ID_FILE_OPEN, <font class='string'>&quot;&Open...&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Control = .Add(xtpControlButton, ID_APP_EXIT, <font class='string'>&quot;E&xit&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Control.BeginGroup = <font class='keyword'>True</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>End</font> <font class='keyword'>With</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add a tab titled "Write" to the Ribbon Bar</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> TabWrite = RibbonBar.InsertTab(0, <font class='string'>&quot;Writ&e&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add a group titled "Clipboard" to the "Write" tab.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> GroupClipborad = TabWrite.Groups.AddGroup(<font class='string'>&quot;&Clipboard&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add buttons to the "Clipboard" group</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ControlPaste = GroupClipborad.Add(xtpControlSplitButtonPopup, ID_EDIT_PASTE, <font class='string'>&quot;&Paste&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlPaste.CommandBar.Controls.Add xtpControlButton, ID_EDIT_PASTE, <font class='string'>&quot;&Paste&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlPaste.CommandBar.Controls.Add xtpControlButton, ID_EDIT_PASTE_SPECIAL, <font class='string'>&quot;&Paste Special&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GroupClipborad.Add xtpControlButton, ID_EDIT_CUT, <font class='string'>&quot;&Cut&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GroupClipborad.Add xtpControlButton, ID_EDIT_COPY, <font class='string'>&quot;&Copy&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Control = GroupClipborad.Add(xtpControlButton, ID_FORMAT_PAINTER, <font class='string'>&quot;Format Painter&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Control.Enabled = <font class='keyword'>False</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add a group titled "Font" to the "Write" tab.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> GroupFont = TabWrite.Groups.AddGroup(<font class='string'>&quot;&Font&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add buttons to the "Font" group</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GroupFont.Add xtpControlButton, ID_TEXT_COLOR, <font class='string'>&quot;Color&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Control = GroupFont.Add(xtpControlButton, ID_CHAR_BOLD, <font class='string'>&quot;&Bold&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Control.BeginGroup = <font class='keyword'>True</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GroupFont.Add xtpControlButton, ID_CHAR_ITALIC, <font class='string'>&quot;&Italic&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GroupFont.Add xtpControlButton, ID_CHAR_UNDERLINE, <font class='string'>&quot;&Underline&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Control = GroupFont.Add(xtpControlButton, ID_CHAR_STRIKETHROUGH, <font class='string'>&quot;Strikethrough&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Control.Enabled = <font class='keyword'>False</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Control = GroupFont.Add(xtpControlButton, ID_TEXT_SUBSCRIPT, <font class='string'>&quot;Subscript&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Control.Enabled = <font class='keyword'>False</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Control = GroupFont.Add(xtpControlButton, ID_TEXT_SUPERSCRIPT, <font class='string'>&quot;Superscript&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Control.Enabled = <font class='keyword'>False</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add a tab titled "Insert" to the Ribbon Bar</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> TabInsert = RibbonBar.InsertTab(1, <font class='string'>&quot;&Insert&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add a group titled "Pages" to the "Insert" tab.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> GroupPages = TabInsert.Groups.AddGroup(<font class='string'>&quot;&Pages&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add buttons to the "Pages" group</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ControlNew = GroupPages.Add(xtpControlSplitButtonPopup, ID_PAGES_NEW, <font class='string'>&quot;&New Page&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlNew.CommandBar.Controls.Add xtpControlButton, ID_NEWPAGE_BLANKPAGE, <font class='string'>&quot;&Blank Page&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlNew.CommandBar.Controls.Add xtpControlButton, ID_NEWPAGE_SELECTION, <font class='string'>&quot;&Save Selection as New Page&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ControlCover = GroupPages.Add(xtpControlSplitButtonPopup, ID_PAGES_COVER, <font class='string'>&quot;Cover Page&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlCover.DescriptionText = <font class='string'>&quot;Insert a fully-formatted cover page. You fill in the title, author, date, and other information.&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlCover.CommandBar.Controls.Add xtpControlButton, ID_COVERPAGE_REMOVECURRENTCOVERPAGE, <font class='string'>&quot;&Remove Current Cover Page&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlCover.CommandBar.Controls.Add xtpControlButton, ID_COVERPAGE_SAVESELECTIONASNEWCOVERPAGE, <font class='string'>&quot;&Save Selectio as New Cover Page&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GroupPages.Add xtpControlButton, ID_PAGES_BREAK, <font class='string'>&quot;Page Break&quot;</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add a group titled "Table" to the "Insert" tab.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> GroupTable = TabInsert.Groups.AddGroup(<font class='string'>&quot;&Table&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Add buttons to the "Table" group</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ControlTable = GroupTable.Add(xtpControlButtonPopup, ID_TABLE_NEW, <font class='string'>&quot;&Table&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlTable.CommandBar.Controls.Add xtpControlButton, ID_TABLE_INSERTTABLE, <font class='string'>&quot;&Inset Table..&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlTable.CommandBar.Controls.Add xtpControlButton, ID_TABLE_DRAWTABLE, <font class='string'>&quot;Dra&w Table&quot;</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ControlTable.CommandBar.Controls.Add xtpControlButton, ID_TABLE_CONVERTTEXTTOTABLE, <font class='string'>&quot;Con&vert Text to Table...&quot;</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Select the "Insert" tab on start up.</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;TabInsert.Selected = <font class='keyword'>True</font><BR/>
</CODE></TD></TR></TABLE></DIV></DIV>
<!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="seealso" source="Item" filter="" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$See_Also$$</h4><p id=dxseealsocontent>%%filtereditemlist%%</p>" --><h4 class=dxh4>See Also</h4><p id=dxseealsocontent><a href="#Bookmark5382">RibbonBar Members</a>
&nbsp;|&nbsp;<a href="#Bookmark4646">AddRibbonBar Method</a>
&nbsp;|&nbsp;<a href="#Bookmark4664">FindControl Method</a>
&nbsp;|&nbsp;<a href="#Bookmark4716">Execute Event</a>
&nbsp;|&nbsp;<a href="#Bookmark4729">Update Event</a>
&nbsp;|&nbsp;<a href="#Bookmark5386">EnableDocking Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5393">RecalcLayout Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5394">RedrawBar Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5398">SetIconSize Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5429">TabCount Property</a>
&nbsp;|&nbsp;<a href="#Bookmark5392">InsertTab Method</a>
&nbsp;|&nbsp;<a href="#Bookmark5479">RibbonGroup Object</a>
&nbsp;|&nbsp;<a href="#Bookmark7523">XTPControlFlags Enumeration</a>
</p><!--DXMETADATA end --><!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="example" source="Item" filter="type=linked" NoHeader="True" NoFooter="True" format="><!--DXMETADATA end --><!--DXMETADATA start type="Variable" name="CopyrightNotice" format="><!--DXMETADATA end --></div></div>	
	<div id="winchm_template_footer">Copyright &copy; 2018. All rights 
reserved. (To change the copyright info, just edit it in template.)</div>
</div>

</body>
</html>

